package tm.testing;

import java.util.ArrayList;

import com.jme.curve.PolylineCurve;
import com.jme.math.Vector3f;

public class Route {

	protected ArrayList<Vector3f> points;
	private String identifier;
	private float heightValue;
	private PolylineCurve route;
	protected MapGrid mapGrid;
	
	
	public static int RIGHT = 0;
	public static int TOWARDS = 1;
	
	public Route(String id, float height, MapGrid mg) {
		identifier = id;
		points = new ArrayList<Vector3f>();
		route = null;
		heightValue = height;
		mapGrid = mg;
	}
	
	public void buildCurve() {
		// TODO Add exception in case somebody is trying to build curve with empty points (check points.size())
		route = new PolylineCurve("CurveTo"+identifier, points.toArray(new Vector3f[0]));
		route.setSteps(100);
	}
	
	
	public float getHeightValue() {
		return heightValue;
	}
	
	
	public PolylineCurve getCurve() {
		return route;
	}
	
	
}
